package com.talkyun.openx.server.core;

import java.util.HashMap;
import java.util.Map;

/**
 * Base rpc message wrapper
 * <p/>
 * Created by kevin on 2015/1/11.
 */
public abstract class ServiceMessage {
    private Map<String, String> header = new HashMap<String, String>();
    private String session;

    protected ServiceMessage(String session) {
        this.session = session;
    }

    public String getSession() {
        return session;
    }

    public void setSession(String session) {
        this.session = session;
    }

    public String head(String key) {
        return header.get(key);
    }

    public ServiceMessage head(String key, String val) {
        header.put(key, val);
        return this;
    }

    public Map<String, String> getHeader() {
        return header;
    }
}